// 角色管理
const sequelize = require('../config.js')
const { DataTypes } = require('sequelize')

const roleSys = sequelize.define('role_sys', {
	role_id:{
		type:DataTypes.INTEGER,
		primaryKey: true,
		autoIncrement:true
	},
	role_name:{
		type: DataTypes.STRING,
		comment:"角色名称"
	},
	role_school_id:{
	  type: DataTypes.INTEGER,
	  allowNull: false,
	  references: {
	    model: 'school_infos',
	    key: 'school_id'
	  },
	  comment:'角色所属院校ID'
	},
	role_rank_id:{
		type:DataTypes.STRING,
		allowNull:false,
		comment:"角色所属职级ID"
	},
	role_class_ids:{
		type:DataTypes.STRING,
		allowNull:false,
		comment:"角色所负责年级"
	}
  },{timestamps:false});

  module.exports = roleSys